//
//  JWBox.m
//  KotH
//
//  Created by James Weatherley on 16/08/2008.
//  Copyright 2008 James Weatherley. All rights reserved.
//

#import "../koth.h"


@implementation JWBox

#pragma mark Protocol

@synthesize selected;
@synthesize square;
@synthesize heightAboveSquare;


-(id)initWithSquare:(JWSquare*)square_
{
	self = [super init];
	square = square_;
	heightAboveSquare = [square boxCount];
	[square addBox:self];
 
	return self;
}

-(NSObject<JWManager>*)manager
{
	return [[JWManagers sharedManager]managerOfClass:[JWBoxManager class]];
}

+(NSInteger)energy
{
	return 2;
}

#pragma mark Implementation
-(void)lower
{	
	--heightAboveSquare;
}

@end